﻿using System;
using System.ComponentModel.Design;

namespace HML.Design
{
    /// <summary>
    /// TabControlPlus子控件集合属性编辑窗口扩展
    /// </summary>
    internal class TabControlPlusControlsCollectionEditor : CollectionEditor
    {
        public TabControlPlusControlsCollectionEditor() : base(typeof(TabPagePlusCollection))
        {

        }

        protected override object SetItems(object editValue, object[] value)
        {
            TabControlPlus tabControl = this.Context.Instance as TabControlPlus;
            if (tabControl != null)
                tabControl.SuspendLayout();
            object obj = base.SetItems(editValue, value);
            if (tabControl != null)
                tabControl.ResumeLayout();
            return obj;
        }

    }
}
